package com.example.autoconfig;

import com.example.autoconfig.property.AutoConfigProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({AutoConfigProperty.class})
public class SpringAutoConfig {

    @Autowired
    AutoConfigProperty autoConfigProperty;

    public SpringAutoConfig(AutoConfigProperty autoConfigProperty) {
        this.autoConfigProperty=autoConfigProperty;
        System.out.println("/=================autoconfig start==================/");
        System.out.println("=====autocinfig===" + autoConfigProperty.getName());
    }
}
